package com.onLineCar.management.feign;



/**
 * @author : 段敏强
 * @className : OrderData
 * @description : 描述说明该类的功能
 * @createTime : 2023/12/18 19:27
 */

import com.onLineCar.common.core.domain.Result;
import com.onLineCar.management.domain.PayRequest;
import com.onLineCar.management.domain.Reconciliation;
import com.onLineCar.management.domain.RequestOrder;
import com.onLineCar.management.feign.impl.OrderDataFeignClientFallback;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;

/**
 * 远程调用订单数据服务
 * @author  段敏强
 */
@FeignClient(name = "onLineCar-vehice",fallback = OrderDataFeignClientFallback.class)
public interface OrderData {

    /**
     * @description: 用户下单
     * @author: Lxk
     * @date: 2023/12/11 22:07
     * @param: [tblOrder]
     * @return: com.onLineCar.common.core.domain.Result<?>
     **/
    @PostMapping("/tbl-order/placeAnOrder")
    public Result<?> placeAnOrder(@RequestBody RequestOrder tblOrder);



    /**
     * @description: 查询订单号
     * @author: Lxk
     * @date: 2023/12/11 22:07
     * @param: [tblOrder]
     * @return: com.onLineCar.common.core.domain.Result<com.onLineCar.vehicle.entity.TblOrder>
     **/
    @PostMapping("/tbl-order/selectOrderNumber")
    public Result<RequestOrder> selectOrderNumber(@RequestBody RequestOrder tblOrder);


    /**
     * @description:根据用户id查询用户正在进行的订单
     * @author: Lxk
     * @date: 2023/12/15 15:41
     * @param: [id]
     * @return: com.onLineCar.common.core.domain.Result<com.onLine.vehicle.entity.TblOrder>
     **/
    @GetMapping("/tbl-order/carryOut/{passengerInfoId}")
    public Result<RequestOrder> carryOut(@PathVariable(value = "passengerInfoId") Integer passengerInfoId);


    /**
     * @description: 生成订单号
     * @author: Lxk
     * @date: 2023/12/15 15:41
     * @param: []
     * @return: java.lang.String
     **/
    @GetMapping("/tbl-order/createAnOrderNumber")
    public String createAnOrderNumber();


    /**
     * @description: 根据订单号修改状态为乘客已上车
     * @author: Lxk
     * @date: 2023/12/30 10:44
     * @param: [orderNUmber]
     * @return: com.onLineCar.common.core.domain.Result
     **/
    @GetMapping("/tbl-order/updateUserReach/{orderNUmber}")
    public Result updateUserReach(@PathVariable(name = "orderNUmber") String orderNumber);


    /**
     * @description: 用户取消订单
     * @author: Lxk
     * @date: 2023/12/25 17:06
     * @param: [reconciliation]
     * @return: com.onLineCar.common.core.domain.Result
     **/
    @PostMapping("/tbl-order/cancelOrder")
    public Result cancelOrder(@RequestBody Reconciliation reconciliation);




}
